#include <REGX52.H>
void Delay1ms(unsigned int xms);
void main()
{
	while(1){
		
		P2 = 0xFE;
		Delay1ms(50);
		P2 = 0xFD;
		Delay1ms(50);
		P2 = 0xFB;
		Delay1ms(50);
		P2 = 0xF7;
		Delay1ms(50);		
		P2 = 0xEF;
		Delay1ms(50);
		P2 = 0xDF;
		Delay1ms(50);		
		P2 = 0xBF;
		Delay1ms(50);		
		P2 = 0x7F;
		Delay1ms(50);		
		
	}
}	


void Delay1ms(unsigned int xms)		//@12.000MHz
{
	while(xms)
	{
		unsigned char i, j;

		i = 12;
		j = 169;
		do
		{
			while (--j);
		} while (--i);
		xms--;
	}	

}
